Improve .pc file to avoid over-linking (and Lintian false-positives)
authorSimon McVittie <smcv@debian.org>
Thu, 18 Jul 2019 08:22:02 +0000 (09:22 +0100)
committerSimon McVittie <smcv@debian.org>
Thu, 18 Jul 2019 08:22:02 +0000 (09:22 +0100)
debian/changelog
debian/patches/gtk4.pc-Move-third-party-libraries-from-Libs-to-Libs.priv.patch [new file with mode: 0644]
debian/patches/series

index 0082e279309d3099234f7ffbfbfa72b5036ee320..2e37fef23ed6354afa373da5cf2f03cb61b979af 100644 (file)
@@ -75,6 +75,8 @@ gtk+4.0 (3.96.0-1) UNRELEASED; urgency=medium
   * Add Build-Depends-Package to symbols file
   * d/p/testsuite-Remove-dangling-references-to-box-packing-tests.patch:
     Fix dangling references to removed box-packing tests
+  * d/p/gtk4.pc-Move-third-party-libraries-from-Libs-to-Libs.priv.patch:
+    Improve .pc file to avoid over-linking (and Lintian false-positives)
 
   [ Laurent Bigonville ]
   * Add Closes statement for #910640
diff --git a/debian/patches/gtk4.pc-Move-third-party-libraries-from-Libs-to-Libs.priv.patch b/debian/patches/gtk4.pc-Move-third-party-libraries-from-Libs-to-Libs.priv.patch
new file mode 100644 (file)
index 0000000..59405da
--- /dev/null
@@ -0,0 +1,29 @@
+From: Simon McVittie <smcv@debian.org>
+Date: Thu, 18 Jul 2019 09:20:57 +0100
+Subject: gtk4.pc: Move third-party libraries from Libs to Libs.private
+
+This avoids "overlinking". These libraries are an implementation detail
+of particular backends, so they only need to appear on library consumers'
+linker command-lines if the dependency cannot be picked up from the
+shared library automatically (when linking statically, or when building
+on a deficient OS that doesn't support transitive dependencies between
+shared libraries, in which case pkg-config should be built with
+--enable-indirect-deps).
+
+Signed-off-by: Simon McVittie <smcv@debian.org>
+---
+ gtk4.pc.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/gtk4.pc.in b/gtk4.pc.in
+index e721361..b6822bd 100644
+--- a/gtk4.pc.in
++++ b/gtk4.pc.in
+@@ -12,5 +12,6 @@ Description: GTK Graphical UI Library
+ Version: @VERSION@
+ Requires: @GDK_PACKAGES@ @GSK_PACKAGES@ @GTK_PACKAGES@
+ Requires.private: @GDK_PRIVATE_PACKAGES@ @GSK_PRIVATE_PACKAGES@ @GTK_PRIVATE_PACKAGES@
+-Libs: -L${libdir} -lgtk-4 @GDK_EXTRA_LIBS@ @GSK_EXTRA_LIBS@ @GTK_EXTRA_LIBS@
++Libs: -L${libdir} -lgtk-4
++Libs.private: @GDK_EXTRA_LIBS@ @GSK_EXTRA_LIBS@ @GTK_EXTRA_LIBS@
+ Cflags: -I${includedir}/gtk-@GTK_API_VERSION@ @GDK_EXTRA_CFLAGS@ @GSK_EXTRA_CFLAGS@ @GTK_EXTRA_CFLAGS@
index 809c9722c764ba599333a23b871bf8861fe52841..341083f5946d1e3a9abc22d3a380d149562ff55c 100644 (file)
@@ -1 +1,2 @@
 testsuite-Remove-dangling-references-to-box-packing-tests.patch
+gtk4.pc-Move-third-party-libraries-from-Libs-to-Libs.priv.patch